package com.zhuge_new.Dialog;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.flyco.dialog.widget.base.BaseDialog;
import com.zhuge_new.Activity.RealNameActivity;
import com.zhuge_new.R;

/**
 * Created by lenovo on 2018-08-29.
 */

public class Home_Dialog extends BaseDialog<Home_Dialog> {

    private Context context;
    private TextView bt_home_log;
    private ImageView bank;

    public Home_Dialog(Context context) {
        super(context);
        this.context=context;
    }

    @Override
    public View onCreateView() {
        widthScale(0.8f);
        View inflace=View.inflate(context, R.layout.home_log,null);
        bt_home_log = inflace.findViewById(R.id.bt_home_log);
        bank = inflace.findViewById(R.id.bank);
        return inflace;
    }


    @Override
    public void setUiBeforShow() {
        bt_home_log.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(context, RealNameActivity.class);
                context.startActivity(intent);
                dismiss();
            }
        });
        bank.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
    }
}
